package work.mediway.common.domain.constant;

/**
 * 系统常量数据
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2019/11/13
 */
public class CoreConstant {

    /**
     * 主键的数字部分长度
     */
    public static final int PRIMARY_KEY_NUM_LEN = 5;

    /**
     * medical-emr -> bWVkaWNhbC1lbXI=
     */
    public static final String DEFAULT_LOGIN_USER = "dhccensemr";
    public static final String DEFAULT_LOGIN_PASS = "yyxxpt";
    public static final String DEFAULT_ROLE_NAME = "游客";


    public static final String LOG_STR = "\n=========================================================================\n{}\n=========================================================================";

    public static final String PRAMS_SEPARATOR = ",";
    public static final String DEFAULT_PASSWORD = "123456";

    public static final String PARAMS_ACTION = "action";

    /**
     * 项目名称
     */
    public static final String PROJECT_NAME = "EMR";


    /**
     * 允许下载的文件类型，根据需求自己添加（小写）
     */
    public static final String[] FILE_SUFFIX_ARR = {".xlsx", ".zip", ".pdf", ".html", ".png"};


    /**
     * 异步线程池名称
     */
    public static final String ASYNC_POOL = "dimplesAsyncThreadPool";

    /**
     * 默认父节点id
     */
    public static final String DEFAULT_ROOT = "0";

    /**
     * 返回报文头 json格式，编码 utf-8
     */
    public static final String JSON_UTF8 = "application/json;charset=utf-8";

    /**
     * 认证请求头前缀
     */
    public static final String HEADER_AUTHENTICATION = "Basic ";

    /**
     * 正则,只能是数字和字母
     */
    public static final String REGEX_NUMBER_LETTER = "^[a-z0-9A-Z]+$";

    /**
     * 正则, 只能为数字
     */
    public static final String REGEX_NUMBER = "^[0-9]+$";

    /**
     * 临时文件目录
     */
//    public static final String TMP_FILE_DIR = "/Users/bovane/Documents/hos-old-git/logs/";
    public static final String TMP_FILE_DIR = "/TMP-Medical/EMR/File/";

    public static final String FONT_PATH_WIN = "C:\\Windows\\Fonts\\simsun.ttf";
    public static final String FONT_PATH_LINUX = "/usr/share/fonts/chinese/simsun.ttf";
    public static final String FONT_PATH_MAC = "/Users/bovane/Downloads/wkhtmltopdf/simsun.ttf";


    /**
     * 图片的DPI
     */
    public static final int DPI = 200;

    /**
     * 默认用户
     */
    public static final String DEFAULT_USER = "ADMIN";

    public static final Integer CODE_FILL_LEN = 5;

    /**
     * 菜单代码前缀
     */
    public static final String MENU_PREFIX = "Menu";

    /**
     * 菜单代码前缀
     */
    public static final String USER_PREFIX = "USER";

    /**
     * 菜单代码前缀
     */
    public static final String SYS_PREFIX = "SYS";

    /**
     * 权限代码前缀
     */
    public static final String AUTH_PREFIX = "AUTH";


    /**
     * 菜单长度
     */
    public static final String CODE_LENGTH = "000000";

    public static final String AUTHORIZED_GRANT_TYPES = "refresh_token,password";

    /**
     * 以字段脱敏
     */
    public static final Long SENSITIVE_TYPE_FILED = 1L;

    /**
     * 以记录脱敏
     */
    public static final Long SENSITIVE_TYPE_RECORD = 2L;

    /**
     * 参数是否必须
     */
    public static final String[] PARAM_REQUIRE = {"true", "false"};

    /**
     * 图片水印文字
     */
    public static final String IMAGE_TEXT = "患者全息视图";

    /**
     * 图片水印文字大小
     */
    public static final int IMAGE_TEXT_SIZE = 150;

    public static final String LAUNCH_NAME = "launch.html";
    public static final String WEB_LOCAL_IP = "WEB_LOCAL_IP";

    /**
     * 加密URL地址
     */
    public static final String ENCRYPT_URL_PREFIX = "/encrypt";

    /**
     * 是否对返回数据进行加密
     */
    public static final String ENCRYPT = "IS_ENCRYPT";

    public static final String HTML = "HTML";
    public static final String PDF = "PDF";

}















